/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mii.ejb.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;

/**
 *
 * @author TEKNISI
 */
@Entity
public class Complain implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String kodeComp;
    private String jenisComp;
    private String priorityComp;
    private String statusComp;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date tglmasukComp;
    private String isiComp;
    @ManyToOne(cascade = CascadeType.ALL)
    private Customer customer;
    @ManyToOne(cascade = CascadeType.ALL)
    private Engineer engineer;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Complain)) {
            return false;
        }
        Complain other = (Complain) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mii.ejb.entity.Complain[ id=" + id + " ]";
    }

    /**
     * @return the kodeComp
     */
    public String getKodeComp() {
        return kodeComp;
    }

    /**
     * @param kodeComp the kodeComp to set
     */
    public void setKodeComp(String kodeComp) {
        this.kodeComp = kodeComp;
    }

    /**
     * @return the jenisComp
     */
    public String getJenisComp() {
        return jenisComp;
    }

    /**
     * @param jenisComp the jenisComp to set
     */
    public void setJenisComp(String jenisComp) {
        this.jenisComp = jenisComp;
    }

    /**
     * @return the priorityComp
     */
    public String getPriorityComp() {
        return priorityComp;
    }

    /**
     * @param priorityComp the priorityComp to set
     */
    public void setPriorityComp(String priorityComp) {
        this.priorityComp = priorityComp;
    }

    /**
     * @return the statusComp
     */
    public String getStatusComp() {
        return statusComp;
    }

    /**
     * @param statusComp the statusComp to set
     */
    public void setStatusComp(String statusComp) {
        this.statusComp = statusComp;
    }

    /**
     * @return the tglmasukComp
     */
    public Date getTglmasukComp() {
        return tglmasukComp;
    }

    /**
     * @param tglmasukComp the tglmasukComp to set
     */
    public void setTglmasukComp(Date tglmasukComp) {
        this.tglmasukComp = tglmasukComp;
    }

    /**
     * @return the isiComp
     */
    public String getIsiComp() {
        return isiComp;
    }

    /**
     * @param isiComp the isiComp to set
     */
    public void setIsiComp(String isiComp) {
        this.isiComp = isiComp;
    }

    /**
     * @return the customer
     */
    public Customer getCustomer() {
        return customer;
    }

    /**
     * @param customer the customer to set
     */
    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    /**
     * @return the engineer
     */
    public Engineer getEngineer() {
        return engineer;
    }

    /**
     * @param engineer the engineer to set
     */
    public void setEngineer(Engineer engineer) {
        this.engineer = engineer;
    }
    
}
